package com.google.code.solrdimension.test.services;

import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.SolrServerException;


/**
 * All unit tests uses the {@link SolrServiceImpl} to interact with the {@link SolrServer}
 * 
 * @author mhc
 *
 */
public interface SolrService {
    
    /**
     * Returns a solr server
     * @throws SolrServerException if any issue connecting to the server
     * @return
     */
    public SolrServer getSolrServer() throws SolrServerException;
    
    /**
     * Ask SOLR to rebuild the index
     * @throws SolrServerException if the server is in error state or cannot connect to the server
     * @return True if the index is rebuilt successfully
     * @throws Exception 
     */
    public boolean rebuildIndex() throws Exception;
    
    
}
